<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<html>

<head>

    <script type="text/javascript" src="/js/jquery.min.js"></script>


    <title>Title</title>
    
    <script>
        
        function login() {
            $.ajax({
                url: '/login',
                type: 'POST',
                data: $('#form1').serialize(),
                dataType: 'text',
                success: function (data) {
                    if(data=="success"){
                        window.location.href="/resume";
                    }else {
                        alert(data);
                    }
                }
            })
            
        }
        
        
    </script>

</head>

<body>

<form id="form1">

    <div class="log">

        <h2>登录</h2>

        账户：<input type="text" name="name"><br>

        密码：<input type="password" name="password"> <br>

        <input type="button" value="确认登录" onclick="login()">

    </div>

</form>

</body>

</html>